module.exports = function($scope, $modal, $modalInstance, item){
    
    
    init();
	function init(){
        $scope.obj = item;
        if(item.result == '成功'){
            var a = JSON.parse(item.resultdata);
            $scope.obj.data = JSON.stringify(a,null,2);
        }
    };

    
    //任务重新执行
    $scope.reExec = function(){
        console.log(item);
        
        // $resource('/api/ac/sc/eventTaskService/taskList', {}, {}).save({'event_id': item.id}, function (res){
        //     if (res.errcode === 0) {
        //         $scope.task_list = res.data;
                
        //     } else {
        //         alert(res.errmsg);
        //     }
        // });
        
    };

    //关闭
    $scope.cancel = function () {
        $modalInstance.dismiss('cancel');
    };

};